package com.koron.system.staff.mapper;

import com.koron.bean.base.BaseQueryBean;
import com.koron.bean.system.org.dto.OrgDto;
import com.koron.bean.system.staff.StaffBean;
import com.koron.system.org.bean.UnifyOrgBean;
import com.koron.system.staff.bean.UnifyStaffBean;
import com.koron.system.staff.bean.entity.GroupDepartment;
import com.koron.system.staff.bean.entity.GroupStaff;
import com.koron.system.userOrg.bean.po.AppUserOrgPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface UnifyUserMapper {

    List<UnifyOrgBean> queryOrgNodeList(UnifyOrgBean orgBean);

    int insertGroupDepartment(GroupDepartment groupDepartment);

    int updateGroupDepartment(GroupDepartment groupDepartment);

    int inUpAllOrgNode(@Param("orgNodes") List<UnifyOrgBean> orgNodes);

    int deleteOrgNode(String id);

    int deleteStaffNode(String id);

    int inUpAllStaff(@Param("staffs") List<UnifyStaffBean> staffs);

    int insertGroupStaff(GroupStaff groupStaff);

    int updateGroupStaff(GroupStaff groupStaff);

    List<StaffBean> queryStaffList(@Param("staffBean") UnifyStaffBean staffBean, @Param("queryBean") BaseQueryBean queryBean);

    Long queryStaffListCount(@Param("staffBean") UnifyStaffBean staffBean);

    List<StaffBean> queryStaffListWithNoPage(@Param("staffBean") UnifyStaffBean unifyStaffBean);

    int batchInsertOrg(@Param("list") List<OrgDto> orgDtoList);

    int batchInsertStaff(@Param("staffBeans") List<StaffBean> staffBeans);

    int batchInUpUserOrg(@Param("list") List<AppUserOrgPo> userOrgPos);

    UnifyOrgBean queryOrgNode(@Param("code") String code);

}
